import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int t = in.nextInt();
        while (t -- != 0){
            int n = in.nextInt();
            boolean[][] hash = new boolean[n][26];
            for (int i = 0; i < n; i++) {
                char[] s = in.next().toCharArray();
                for (char ch : s){
                    hash[i][ch - 'a'] = true;
                }
            }
            int left = 0,right = n - 1;
            while (left < right){
                if(!check(hash,left,right)) break;
                left++;
                right--;
            }
            if(left < right) System.out.println("No");
            else System.out.println("Yes");
        }
    }
    public static boolean check(boolean[][] hash,int left,int right){
        for (int i = 0; i < 26; i++) {
            if(hash[left][i] && hash[right][i]) return true;
        }
        return false;
    }
}